package com.platform.system.mqtt.utils;

public class Main {
    public static void main(String[]args){
        //System.out.println(reverse(-120));
        //String t = "012";
        //System.out.println(Integer.valueOf(t));
        split("99900|777|8879700797", "00");
    }
    public static int reverse(int st){
        int temp = 0;
        if(st == 0){
            return 0;
        }
        while(st !=0 ){
            int tr = st % 10;
            st = st /10;
            temp = temp * 10 + tr;
            if(temp > Integer.MAX_VALUE || temp < Integer.MIN_VALUE){
                return 0;
            }
        }
        return temp;

    }

    public static void split(String str, String y){
        if(!str.contains(y)){
            System.out.println(str);
        }
        for(int i=0;i<str.length(); ){
            for(int j=i+1;j<=str.length();j++){
                String temp = str.substring(i, j);
                if(temp.indexOf(y) > 0){
                    i = j;
                    System.out.println("符合"+ temp);
                    System.out.println(temp.substring(0, (temp.length() - temp.indexOf(y))));
                    break;
                }
                if( j == str.length()){
                    System.out.println("符合636"+ temp);
                    i = j;
                }
            }
        }
    }
}
